package com.cloud.business.service.sys;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cloud.business.entity.sys.SysEnumDictionary;
import com.cloud.business.model.commonvm.DeletePost;
import com.cloud.business.model.commonvm.ResultMsg;
import com.cloud.business.model.sys.sysenumdictionaryvm.SysEnumDictionaryQueryModel;

import java.util.List;

/**
 * <p>
 * 数据字典 服务类
 * </p>
 *
 * @author dh
 * @since 2020-03-25
 */
public interface ISysEnumDictionaryService {

    /**
     * 分页列表
     *
     * @param sysEnumDictionaryQueryModel
     * @param page
     * @param msg
     * @throws Exception
     */
    void getListByPage(SysEnumDictionaryQueryModel sysEnumDictionaryQueryModel, IPage<SysEnumDictionary> page, ResultMsg msg) throws Exception;

    /**
     * 创建
     *
     * @param sysEnumDictionary
     * @param msg
     * @return
     * @throws Exception
     */
    Integer create(SysEnumDictionary sysEnumDictionary, ResultMsg msg) throws Exception;

    /**
     * 更新
     *
     * @param sysEnumDictionary
     * @param msg
     * @return
     * @throws Exception
     */
    Integer update(SysEnumDictionary sysEnumDictionary, ResultMsg msg) throws Exception;

    /**
     * 获取单条
     *
     * @param operationId
     * @param objectId
     * @param msg
     * @return
     * @throws Exception
     */
    SysEnumDictionary getById(Integer operationId, Integer objectId, ResultMsg msg) throws Exception;

    /**
     * 批量删除
     *
     * @param deletePost
     * @param msg
     * @return
     * @throws Exception
     */
    int deleteByList(DeletePost deletePost, ResultMsg msg) throws Exception;

    /**
     * 根据TableName获取列表
     *
     * @param TableNames
     * @param msg
     * @return
     * @throws Exception
     */
    List<SysEnumDictionary> getListByTableNames(String TableNames, ResultMsg msg) throws Exception;

    /**
     * 判断字典重复
     *
     * @param tableName
     * @param value
     * @param id
     * @param msg
     * @return
     * @throws Exception
     * @author Rex
     */
    boolean checkDic(String tableName, String value, Integer id, ResultMsg msg) throws Exception;

}
